﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace HKEA.CMS.Core.Utility
{
    public static class Constant
    {
        /// <summary>
        /// 上传相关设置
        /// </summary>
        public class UploadConfig
        {
            public static string[] uploadPicType = new string[] { "jpg", "gif", "bmp", "png", "jpeg" };//图片格式
            public static string[] uploadfileType = new string[] { "jpg", "gif", "bmp", "png", "doc", "xls", "pdf", "mht" ,"zip","rar","txt"};//文件格式
            public const string UploadPhotoPath = "~/Upload/photo/";//头像路径
            public const string UploadImagePath = "~/Upload/images/";//其它图片路径
            public const string UploadFilePath = "~/Upload/file/";//文件路径
            public const int maxPicLength = 2000000;//最多图片大小，0不限制
            public const int maxFileLength = 2000000;//最多文件大小，0不限制(字节计数)            
        }
        /// <summary>
        /// 图片缩放方式
        /// </summary>
        public class ImageResizeMode
        {
            /// <summary>
            /// 指定高宽缩放（可能变形）
            /// </summary>
            public const string strHW = "HW";
            /// <summary>
            /// 指定宽，高按比例
            /// </summary>
            public const string strW = "W";
            /// <summary>
            /// 指定高，宽按比例
            /// </summary>
            public const string strH = "H";
            /// <summary>
            /// 指定高宽裁减（不变形）
            /// </summary>
            public const string strCut = "Cut";
            /// <summary>
            /// 最大长宽缩放
            /// </summary>
            public const string strMaxHWCut = "MaxHWCut";
        }

        /// <summary>
        /// 升降序 排序 
        /// </summary>
        public class OrderBy
        {
            /// <summary>
            /// 升序
            /// </summary>
            public const string Asc = "asc";
            /// <summary>
            /// 降序
            /// </summary>
            public const string Descending = "desc";
        }

        public class PerPageRecordCount
        {
            public const int common = 15;
        }

        public class IsDelete
        {
            public const int yes = 1;
            public const int no = 0;
        }

        public class IsPublish
        {
            public const int yes = 1;
            public const int no = 0;
        }

        public class WebLoginStatus
        {
            public const int Active = 1;
            public const int Inactive = 2;
        }

        /// <summary>
        /// 特定Session名称
        /// </summary>
        public class SessionName
        {
            public const string Manage = "Manage";
            public const string Customer = "Customer";
            public const string Test = "Test";
            public const string Member = "Member";
            public const string NextUrl = "next";

            public const string tmp_pic_name = "tmp_pic_name";
            public const string tmp_id = "tmp_id";
            public const string MemberLoginUID = "MemberLoginUID";
        }

        /// <summary>
        /// 特定URL参数名称
        /// </summary>
        public class UrlParamName
        {
            public const string Uid = "uid";
            public const string Code = "code";
            public const string ContactPersonUID = "cpuid";
            public const string custToContactPersonUID = "ctcuid";
            public const string BranchOfficeUID = "bouid";
            public const string CustomerUID = "cuid";
            public const string NextUrl = "next";
            public const string BrandUID = "cbuid";
            public const string PropertyName = "pp";
            public const string OrderBy = "ob";
            public const string CurrentPage = "page";

            public const string IsFromApp = "isFromApp";

            public const string StartDate = "s";
            public const string EndDate = "e";
        }

        /// <summary>
        /// 常用页面定义
        /// </summary>
        public class MainPage
        { 
            public const string index="Index.aspx";
            public const string login="Login.aspx";
            public const string CustomerLogin = "CustomerLogin.aspx";
        }

        public class SplitChar
        {
            /// <summary>
            /// 字符串组合分隔符
            /// </summary>
            public const char SepChar = ',';           
        }

        public class InfoType
        {
            public static Hashtable tellType
            {
                get
                {
                    Hashtable tellHas = new Hashtable();
                    tellHas.Add("1", "General");
                    tellHas.Add("2", "Direct");
                    tellHas.Add("3", "Moblie");
                    tellHas.Add("4", "Pager");
                    tellHas.Add("5", "Skype");
                    return tellHas;
                }
            }

            public static Hashtable FaxType
            {
                get {
                    Hashtable FaxHas = new Hashtable();
                    FaxHas.Add("1", "General");
                    FaxHas.Add("2", "Direct");
                    FaxHas.Add("3", "Moblie");
                    FaxHas.Add("4", "Pager");
                    FaxHas.Add("5", "Skype");
                    return FaxHas;
                }
            }

            public static Hashtable EmailType
            {
                get {
                    Hashtable MailHas = new Hashtable();
                    MailHas.Add("1", "MSN");
                    MailHas.Add("2", "Blog");
                    return MailHas;
                }
            }

            public static Hashtable WebType {
                get {
                    Hashtable WebHas = new Hashtable();
                    WebHas.Add("1", "Official Website");
                    WebHas.Add("2", "Blog");
                    WebHas.Add("3", "Other");
                    return WebHas;
                }
            }
        }

        /// <summary>
        /// 常用路径定义
        /// </summary>
        public class PathInfo
        {
            /// <summary>
            /// 英文版本消息资源文件路径
            /// </summary>
            public const string Resource_Path_EN_US = "HKEA.CMS.Core.Utility.Resource.Language_en_us.Resource";

            /// <summary>
            /// 简体中文消息资源文件路径
            /// </summary>
            public const string Resource_Path_ZH_CN = "HKEA.CMS.Core.Utility.Resource.Language_zh_cn.Resource";

            /// <summary>
            /// 简体中文消息资源文件路径
            /// </summary>
            public const string Resource_Path_ZH_HK = "HKEA.CMS.Core.Utility.Resource.Language_zh_hk.Resource";

            /// <summary>
            /// 邮件模板文件夹
            /// </summary>
            public const string EmailFolder = "~/EmailTemplates/";

            
            /// 上传 图片的虚拟地址
            
            public const string CustomerLogo = "/media/upload/customerlogo/";

            public const string ContactPersonPhoto = "/media/upload/contactpersonphoto/";

            public const string BranchImg = "/media/upload/branchimg/";

            public const string BrandLogo = "/media/upload/brandlogo/";

            public const string ProductImg = "/media/upload/productimg/";

            public const string BranchVideo = "/media/upload/video/branchoffice/";
        }

        public class EmailTemplateName
        {
            public const string ForgetPasswd = "ForgetPasswd.html";

            public const string WebLoginAccount = "WebLoginAccount.html";
        }

        /// <summary>
        /// 客戶類型 
        /// </summary>
        public class CustomType
        {
            /// <summary>
            /// Full Corporate Member 基本企業會員
            /// </summary>
            public const string FC = "FC";

            /// <summary>
            /// Associate Corporate Member 附屬企業會員
            /// </summary>
            public const string AC = "AC";

            /// <summary>
            /// Honorary Corporate Member 名譽企業會員
            /// </summary>
            public const string HC = "HC";

            /// <summary>
            /// Non-Member Corporate 非會員（临时会员）
            /// </summary>
            public const string NC = "NC";

            /// <summary>
            /// Full Individual Member 基本個人會員
            /// </summary>
            public const string FI = "FI";

            /// <summary>
            /// Associate Individual Member 附屬個人會員
            /// </summary>
            public const string AI = "AI";

            /// <summary>
            /// Honorary Individual Member 名譽個人會員
            /// </summary>
            public const string HI = "HI";

            /// <summary>
            /// Non-member Individual 非會員個人
            /// </summary>
            public const string NI = "NI";

            /// <summary>
            /// HKEA Member 香港出口商會會員
            /// </summary>
            public const string HM = "HM";
        }

        public class MediaRoomCategory
        {
            public const string customer_logo = "Customerlogo";
            public const string trademark_logo = "TrademarkLogo";
            public const string contactperson_photo = "ContactPersonPhoto";
            public const string branch_image = "BranchImage";
            public const string brand_logo = "BrandLogo";
            public const string product_image = "ProductImage";
            public const string branch_video = "BranchVideo";           
        }

        public class MediaType
        {
            public const string image = "image";
            public const string video = "video";
            public const string flash = "flash";
        }

        /// <summary>
        /// 图片的通用尺寸
        /// </summary>
        public class PhotoCommonSize
        {
            public static int[] S_37_37 = { 37, 37 };
            public static int[] S_50_50 = { 50, 50 };
            public static int[] S_100_100 = { 100, 100 };
            public static int[] S_150_150 = { 150, 150 };
            public static int[] S_200_120 = { 200, 120 };
            public static int[] S_600_120 = { 600, 400 };
        }

    }

}
